import Vue from 'vue'
import App from './App.vue'
//引入路由
import VueRouter from 'vue-router'
//引入路由器
import router from './router'
//引入vuex
import vuex from 'vuex'
//引入axios
import axios from 'axios'
//引入element-ui
import ElementUI from 'element-ui'
//引入css
import 'element-ui/lib/theme-chalk/index.css';

//引入echarts
// * as echarts解决cannot read properties of undefined init问题
import * as echarts from 'echarts'
import "@arcgis/core/assets/esri/themes/light/main.css"
import "echarts-gl"
Vue.config.productionTip = false
//给全局安装echarts
//在别的组件中使用：this.$echarts
Vue.prototype.$echarts = echarts
//给全局安装axios
Vue.prototype.axios = axios
//使用ElementUI
Vue.use(ElementUI)
//使用VueRouter
Vue.use(VueRouter)
//使用vuex
Vue.use(vuex)
new Vue({
  el:'#app',
  render: h => h(App),
  router,
  //全局事件总线
  beforeCreate(){
    Vue.prototype.$bus = this
  }
})
